package com.devops.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.devops.admin.model.DOSProjectEnvClusterNamespaceRelation;
import com.devops.admin.model.TableResult;
import com.devops.admin.po.DOSClusterNamespacePo;
import com.devops.admin.po.DOSClusterPo;
import com.devops.admin.po.DOSProjectEnvTypePo;
import com.devops.admin.po.DOSProjectEvnClusterPo;


import java.util.List;

/**
 * @ClassName DOSProjectEnvClusterNamespaceRelationService
 * @Description TODO
 * @Author hepingguo
 * @Date 2022/6/20 17:50
 **/
public interface DOSProjectEnvClusterNamespaceRelationService extends IService<DOSProjectEnvClusterNamespaceRelation> {

    /**
     * @Author heyabo
     * @Description 对项目进行授权
     * @Date 17:55 2022/6/20
     * @Param [authorize]
     * @return java.lang.Boolean
     **/
    Boolean authorizeProject(List<DOSProjectEnvClusterNamespaceRelation> authorizes);

    /**
     * @Author heyabo
     * @Description 根据项目id查询项目的授权信息
     * @Date 11:01 2022/6/21
     * @Param [projectId]
     * @return java.util.List<com.devops.admin.po.DOSProjectEvnClusterPo>
     **/
    List<DOSProjectEvnClusterPo> getAuthorizationInfo(Integer projectId);

    /**
     * @Author heyabo
     * @Description 根据
     * @Date 15:33 2022/6/23
     * @Param [projectIds]
     * @return java.util.List<com.devops.admin.po.DOSProjectEnvClusterPo>
     **/
    List<DOSProjectEvnClusterPo> getEnvClusters(List<Integer> projectIds);

    /**
     * @Author heyabo
     * @Description 获取可选择的环境类型
     * @Date 14:59 2022/6/30
     * @Param [projectId]
     * @return com.devops.admin.po.DOSProjectEnvTypePo
     **/
    List<DOSProjectEnvTypePo> getSelectEnvType(Integer projectId);

    /**
     * 根据projectId 和 envType 获取项目授权的集群命名空间信息
     * @param projectId
     * @param envType
     * @return
     */
    List<DOSClusterNamespacePo> getClustersByProjectIdAndEnvType(Integer projectId, Integer envType);

}
